/*
 * Wire
 * Copyright (C) 2018 Wire Swiss GmbH
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses/.
 *
 */

.ctx-menu {
  .list-unstyled;

  position: fixed;
  z-index: @z-index-context;
  display: block;
  min-width: 160px;
  padding: 8px 0;
  border-radius: 12px;
  margin: 0;
  background-color: var(--dropdown-menu-bg);
  box-shadow:
    0 0 1px 0 fade(#000, 8%),
    0 8px 24px 0 fade(#000, 16%);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-xl);
  overflow-y: auto;
  &__item {
    display: flex;
    overflow: hidden;
    max-width: 300px;
    height: 30px;
    align-items: center;
    cursor: pointer;

    span {
      .ellipsis;

      display: inline-block;
      flex-grow: 1;
    }

    &:hover,
    & > :focus-visible {
      background-color: var(--foreground-fade-16);
      outline: none;
    }

    &--disabled {
      color: var(--foreground-fade-48);
      cursor: default;
      font-style: italic;
      &:hover,
      &.selected {
        background-color: transparent;
      }
    }

    &--checked {
      font-weight: var(--font-weight-bold);
    }
  }
  &__button {
    .button-reset-default;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    padding: 8px 24px;
    gap: 8px;
    text-align: left;
  }
  &__separator {
    border-top: 1px solid var(--foreground-fade-16);
    margin: 4px 0;
  }

  &__check {
    max-width: 10px;

    path {
      fill: currentColor;
    }
  }

  &__icon {
    path {
      fill: currentColor;
    }
  }

  &__placeholder {
    position: fixed;
    width: 8.75rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    background-color: var(--modal-bg);
    box-shadow:
      0 0 1px 0 fade(#000, 8%),
      0 8px 24px 0 fade(#000, 16%);
  }
}
